<!DOCTYPE html>
<html lang="zh-cn" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
<head th:replace="common::head"></head>
<body>
<div th:replace="common::top"></div>
        <h1>Thymeleaf - WebSecurity</h1>
        <p>This is the <b>shared</b> zone</p>
        <p>Only authenticated users with roles <b>USER</b> or <b>ADMIN</b> are allowed to see this page.</p>
        <p>Different content is shown depending on the role of the authenticated user.</p>
        <div sec:authorize="hasRole('ROLE_ADMIN')">
            This content is only shown to <b>administrators</b>.
        </div>
        <div sec:authorize="hasRole('ROLE_USER')">
            This content is only shown to <b>users</b>.
        </div>
        <p><a href="../index.html" th:href="@{/index.html}">Back to home page</a></p>
    </body>
</html>
